import request from '@/utils/request2'
/*
改文件的创建：是为了前台和后台的交互，数据的互相传递
*/
// 查询未遂事故列表
export function fetchDisasterList(query) {
  return request({
    url: '/ehs_disaster/list',
    method: 'get',
    baseURL: process.env.VUE_APP_BASE_API2,
    params: query
  })
}
// 新增
export function createDisaster(query) {
  return request({
    url: '/ehs_disaster/add',
    method: 'post',
    baseURL: process.env.VUE_APP_BASE_API2,
    params: query
  })
}
// 删除deleteList
export function deleteList(disid) {
  return request({
    url: '/ehs_disaster/delete',
    method: 'get',
    baseURL: process.env.VUE_APP_BASE_API2,
    params: { disid }
  })
}
// 查询总数量
export function fetchAllCount() {
  return request({
    url: '/ehs_disaster/listcount',
    method: 'get',
    baseURL: process.env.VUE_APP_BASE_API2

  })
}
// 修改页面提交
export function editDisaster(query) {
  return request({
    url: '/ehs_disaster/edit',
    method: 'post',
    baseURL: process.env.VUE_APP_BASE_API2,
    params: query
  })
}
